let fs = require('fs');
let buf = '';

process.stdin.on('readable', function() {
    let chunk = process.stdin.read();
    if (chunk) buf += chunk.toString();
});

process.stdin.on('end', function() {
    let v = parseInt(buf);
    let nums = [];
    for (let i = 1; i * i <= v; ++i) {
        if (v % i == 0) {
            nums.push(i);
            let j = v / i;
            if (j !== i) nums.push(j);
        }
    }
    nums.sort((a, b) => a - b); // 对 nums 数组进行升序排序
    for (let i of nums) console.log(i);
});